home *** CD-ROM | disk | FTP | other *** search
- ' BShow.Bas
- ' Portions Copyright 1987-1990 Microsoft Corp.
- DEFINT A-Z
- SUB ButtonShow (handle)
-
- button = FindButton(handle)
- windo = WindowCurrent
-
- ' =======================================================================
- ' If valid, show the button based on button type and button state
- ' =======================================================================
-
- IF button > 0 THEN
- LOCATE GloWindow(windo).row1 + GloButton(button).row1 - 1, _
- GloWindow(windo).col1 + GloButton(button).col1 - 1
-
- MouseHide
- SELECT CASE GloButton(button).buttonType
- CASE 1
- SELECT CASE GloButton(button).state
- CASE 1
- COLOR GloWindow(windo).textFore, _
- GloWindow(windo).textBack
- PRINT "< " + RTRIM$(GloButton(button).text$) + " >";
- CASE 2
- COLOR GloWindow(windo).highlight, _
- GloWindow(windo).textBack
- PRINT "<";
- COLOR GloWindow(windo).textFore, _
- GloWindow(windo).textBack
- PRINT " "; RTRIM$(GloButton(button).text$); " ";
- COLOR GloWindow(windo).highlight, _
- GloWindow(windo).textBack
- PRINT ">";
- CASE 3
- COLOR GloWindow(windo).textBack, _
- GloWindow(windo).textFore
- PRINT "< " + RTRIM$(GloButton(button).text$) + " >";
- END SELECT
- CASE 2
- SELECT CASE GloButton(button).state
- CASE 1
- COLOR GloWindow(windo).textFore, _
- GloWindow(windo).textBack
- PRINT "[ ] " + RTRIM$(GloButton(button).text$);
- CASE 2
- COLOR GloWindow(windo).textFore, _
- GloWindow(windo).textBack
- PRINT "[X] " + RTRIM$(GloButton(button).text$);
- END SELECT
- CASE 3
- SELECT CASE GloButton(button).state
- CASE 1
- COLOR GloWindow(windo).textFore, _
- GloWindow(windo).textBack
- PRINT "( ) " + RTRIM$(GloButton(button).text$);
- CASE 2
- COLOR GloWindow(windo).textFore, _
- GloWindow(windo).textBack
- PRINT "() " + RTRIM$(GloButton(button).text$);
- END SELECT
- CASE 4
- CASE 5
- SELECT CASE GloButton(button).state
- CASE 1, 2
- bSw = (GloButton(button).state - 1) * 6 + 1
- Box3d GloWindow(windo).row1 _
- + GloButton(button).row1 - 1, _
- GloWindow(windo).col1 _
- + GloButton(button).col1 - 1, _
- GloWindow(windo).row1 _
- + GloButton(button).row1 + 1, _
- GloWindow(windo).col1 _
- + GloButton(button).col1 _
- + LEN(RTRIM$(GloButton(button).text$)) + 2, _
- GloWindow(windo).highlight, _
- GloWindow(windo).textBack, _
- GloWindow(windo).textFore, _
- MID$("SINGLEDOUBLE", bSw, 6), -1
- LOCATE GloWindow(windo).row1 _
- + GloButton(button).row1, _
- GloWindow(windo).col1 _
- + GloButton(button).col1 + 1
- PRINT RTRIM$(GloButton(button).text$);
- CASE 3
- bTLc = SCREEN( _
- GloWindow(windo).row1 + GloButton(button).row1 - 1, _
- GloWindow(windo).col1 + GloButton(button).col1 - 1)
- bSw = ((bTLc <> 201) + 1) * 6 + 1
- Box3d GloWindow(windo).row1 _
- + GloButton(button).row1 - 1, _
- GloWindow(windo).col1 _
- + GloButton(button).col1 - 1, _
- GloWindow(windo).row1 _
- + GloButton(button).row1 + 1, _
- GloWindow(windo).col1 _
- + GloButton(button).col1 _
- + LEN(RTRIM$(GloButton(button).text$)) + 2, _
- GloWindow(windo).textFore, _
- GloWindow(windo).textBack, _
- GloWindow(windo).highlight, _
- MID$("SINGLEDOUBLE", bSw, 6), -1
- LOCATE GloWindow(windo).row1 _
- + GloButton(button).row1, _
- GloWindow(windo).col1 _
- + GloButton(button).col1 + 1
- COLOR GloWindow(windo).textFore, _
- GloWindow(windo).textBack
- PRINT RTRIM$(GloButton(button).text$);
- END SELECT
- CASE 6
- COLOR 0, 7
- PRINT CHR$(24);
- FOR A = 1 TO _
- GloButton(button).row2 - GloButton(button).row1 - 1
- LOCATE GloWindow(windo).row1 _
- + GloButton(button).row1 - 1 + A, _
- GloWindow(windo).col1 + GloButton(button).col1 - 1
- IF A = GloButton(button).state THEN
- PRINT CHR$(219);
- ELSE
- PRINT CHR$(176);
- END IF
- NEXT A
- LOCATE GloWindow(windo).row1 _
- + GloButton(button).row1 - 1 + A, _
- GloWindow(windo).col1 + GloButton(button).col1 - 1
- PRINT CHR$(25);
- CASE 7
- COLOR 0, 7
- PRINT CHR$(27); STRING$( _
- GloButton(button).col2 - GloButton(button).col1 - 1, 176);
- PRINT CHR$(26);
- LOCATE GloWindow(windo).row1 + GloButton(button).row1 - 1, _
- GloWindow(windo).col1 + GloButton(button).col1 - 1 _
- + GloButton(button).state
- PRINT CHR$(219);
- CASE ELSE
- PRINT "Error in Button Parameter";
- END SELECT
- MouseShow
- END IF
- END SUB